# $Id: PKGBUILD 67245 2012-03-05 19:58:15Z arodseth $
# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: iom <pizorn@gmail.com>
# Contributor: iom <pizorn@gmail.com>
# Contributor: Alexander Rødseth <rodseth@gmail.com>

pkgname=gnochm
pkgver=0.9.11
pkgrel=11
pkgdesc="CHM file viewer for GNOME"
arch=('any')
url="http://gnochm.sourceforge.net/"
license=('GPL')
depends=('python2-pychm' 'python2-gconf' 'python2-gtkhtml2' 'python2-libgnome' 'libgtkhtml' 'gconf>=2.18.0.1-4')
makedepends=('perlxml' 'gnome-doc-utils>=0.11.2')
install=gnochm.install
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz")
sha256sums=('ee168ae1a2d1aa23856896a316eb2e4bdfb7be10ed11eb80c72ebc8f525a4c3a')

build() {
  cd "$pkgname-$pkgver"

  ./configure \
    PYTHON=/usr/bin/python2 \
    --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --disable-mime-update \
    --disable-desktop-update
  make
}

package() {
  cd "$pkgname-$pkgver"

  make -j1 GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir" install
  install -dm755 "$pkgdir/usr/share/gconf/schemas"
  gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/$pkgname.schemas" \
    "$pkgdir/etc/gconf/schemas/"*.schemas
  rm -f "$pkgdir/etc/gconf/schemas/"*.schemas
  install -Dm644 data/gnochm.desktop \
    "$pkgdir/usr/share/applications/gnochm.desktop"
}

# vim:set ts=2 sw=2 et:
